public class eg3_4 {
    public static void main(String[] args) {
        System.out.println("**正确用法**");
            char grade='F';
        switch (grade){
            case 'A':
                System.out.println(grade+"is 85~100");
                break;
            case 'B':
                System.out.println(grade+"is 70~84");
                break;
            case 'C':
                System.out.println(grade+" is 60~69");
                break;
            case 'D':
                System.out.println(grade+"is 60以下");
                break;
            default:
                System.out.println("输入错误");     // 含break
            }
             grade='A';
        switch (grade){
            case 'A':
                System.out.println(grade+"is 85~100");
            case 'B':
                System.out.println(grade+"is 70~84");
            case 'C':
                System.out.println(grade+" is 60~69");
            case 'D':
                System.out.println(grade+"is 60以下");
            default:
                System.out.println("输入错误");
        }
        System.out.println("**部分含有break的case语句**");
        grade='B';
        switch (grade){
            case 'A':
            case 'B':
            case 'C':
                System.out.println(grade+" is >=60");
                break;
            case 'D':
                System.out.println(grade+" is <60");
                break;
            default:
                System.out.println("输入错误");

        }
    }
}
